<?php
/*
 *Template Name: success
 */

?>


<?php
  get_header();
?>
  <div class="page2 success">
    <div class="w1200 clearfix">
     <?php

      $args = array(
        'caller_get_posts'=> 1,
        'cat'             => get_query_var('cat'),
        'paged'           => 1,
        'posts_per_page'  => 999
      );

      query_posts($args);
      while( have_posts() ) {
        the_post();

     ?>
      <div class="success-item">
          <a href="<?php echo home_url('index.php/success_detail?cat_id='.$post->ID); ?>" class='link-wrap'>
              <?php
               if(has_post_thumbnail()){
                  the_post_thumbnail('success');
               } else {
              ?>
                <img src="<?php bloginfo('template_url'); ?>/images/dot.jpg" alt="..." />
              <?php } ?>
              <h3 class='transiti'><?php the_title(); ?></h3>
              <p class='desc'>
                <?php echo get_post_meta($post->ID, 'desc', true); ?>
              </p>
          </a>
      </div>
    <?php
      }

      wp_reset_query();
    ?>
    </div>
  </div>

<?php
  get_footer();
?>